#!/bin/bash 
read -p "请输入成绩:" SCORE
if [ $SCORE -lt 0 -o $SCORE -gt 100 ]
then
    echo "成绩不合理"
    exit
fi

if [ $SCORE -ge 90 -a $SCORE -le 100 ]
then
    echo "A"
elif [ $SCORE -ge 80 -a $SCORE -lt 90 ]
then
    echo "B"
elif [ $SCORE -ge 70 ] && [ $SCORE -lt 80 ]
then
    echo "C"
elif [ $SCORE -ge 60 ] && [ $SCORE -lt 70 ]
then
    echo "D"
else
    echo "不及格"
fi
